#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int i = 0;
	char arr[81];       //'A'+'Z'=155
	scanf("%c", &arr[i]);
	while (arr[i] != '\n')
	{
		i++;
		scanf("%c", &arr[i]);
	}
	i = 0;
	while (arr[i] != '\n')
	{
		if (arr[i] >= 'A' && arr[i] <= 'Z')
		{
			arr[i] = 155 - arr[i];
		}
		printf("%c", arr[i]);
		i++;
	}
	return 0;
}